import request from '/@/utils/request';

// 查询道闸设备列表
export function listGate(query?: Object) {
  return request({
    url: '/module/barrier/gate/list',
    method: 'get',
    params: query
  })
}

// 查询道闸设备详细
export function getGate(id?: number) {
  return request({
    url: '/module/barrier/gate/' + id,
    method: 'get'
  })
}

// 新增道闸设备
export function addGate(data?: Object) {
  return request({
    url: '/module/barrier/gate',
    method: 'post',
    data
  })
}

// 修改道闸设备
export function updateGate(data?: Object) {
  return request({
    url: '/module/barrier/gate',
    method: 'put',
    data
  })
}

// 删除道闸设备
export function delGate(id?: number) {
  return request({
    url: '/module/barrier/gate/' + id,
    method: 'delete'
  })
}

// 导出道闸设备
export function exportGate(query?: Object) {
  return request({
    url: '/module/barrier/gate/export',
    method: 'get',
    params: query
  })
}

//生成二维码
export function resetQrCode(data?: Object) {
  return request({
    url: '/module/barrier/gate/resetQrCode',
    method: 'post',
    data: data
  })
}
